#ifndef QTANIMWIDGET_H
#define QTANIMWIDGET_H

#include "QtAnimStruct.h"

#include <QtGui/QtGui>

class QtAnimWidget : public QGraphicsProxyWidget
{
	Q_OBJECT
public:
	QtAnimWidget( QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0 );
	virtual ~QtAnimWidget();

	void createAnim(const QString& animName, const QtTransform& transBeg, const QtTransform& transEnd,
					const QEasingCurve curve=QEasingCurve::Linear, int timer=1000);

	void playAnim(const QString& animName, bool bForward = true);
public slots:
	void updateAnimStep(qreal timeStep);
	void finishedSlot();
signals:
	void finished(bool bForward=true);
private:
	QVector<QtAnimStruct> mAnimList;
	QString               mCurAnim;
};

#endif